package com.yiduan.apollocrm
{
	import com.yiduan.apollocrm.services.LeadService;
	import com.yiduan.apollocrm.views.*;
	import com.yiduan.apollocrm.views.mediators.*;
	
	import flash.display.DisplayObjectContainer;
	
	import org.robotlegs.mvcs.Context;
	
	public class ApolloCRMContext extends Context
	{
		public function ApolloCRMContext(contextView:DisplayObjectContainer=null, autoStartup:Boolean=true)
		{
			super(contextView, autoStartup);
		}
		
		override public function startup():void {
			trace("ApolloCRM");			
			injector.mapClass(LeadService,LeadService);
			
			mediatorMap.mapView(LeadsView, LeadsMediator);
			mediatorMap.mapView(NewLeadView, NewLeadMediator);
			mediatorMap.mapView(HomeView, HomeMediator);
			mediatorMap.mapView(ProductsView, ProductsMediator);
			mediatorMap.mapView(NewOrEditProductView, NewOrEditProductMediator);
			mediatorMap.mapView(OpportunitiesView, OpportunitiesMediator);
			mediatorMap.mapView(NewOrEditOpportunityView, NewOrEditOpportunityMediator);
			mediatorMap.mapView(ContractsView, ContractsMediator);
			mediatorMap.mapView(DashboardView, DashboardMediator);
			mediatorMap.mapView(CampaignView,CampaignMediator);
			mediatorMap.mapView(CampaignEditView,CampaignEditMediator);
		}
	}
}